package test.enba.es.repository;

import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;

import java.util.List;
import test.enba.es.doc.Product;

public interface ProductRepository extends ElasticsearchRepository<Product, String> {

    // 自定义查询方法：根据名称查找
    List<Product> findByName(String name);

    // 自定义查询方法：根据价格范围查找
    List<Product> findByPriceBetween(double minPrice, double maxPrice);
}